﻿CREATE PROCEDURE [dbo].[ETL_SP_GetMappedDtTables]
	@Filter nvarchar(64),
	@Start int,
	@Limit int
AS
	select T1.* from (
	SELECT  ROW_NUMBER() OVER (order by T.Name) as _RowIndex, 
		T.* from ETL_DtTable as T where T.Name like '%'+@Filter+'%' and T.Id in (select M.DtTableId from ETL_DtSourceMapping as M)) as T1
	where T1._RowIndex > @Start and T1._RowIndex <=@Start + @Limit
RETURN 0
